$(document).ready(function(){
	sort(); //排名
})
/*
排名区函数
*/
function sort(){
	//页面一加载，出现的是货物量的排名
	$("#sort_list").attr("src","/jiaoshenmateam-news/CargoAgent/show?judge=0");
	//服务质量排名
	$("#quality").click(function(){
		if($("#Ainput").val() ==''){
			$("#sort_list").attr("src","/jiaoshenmateam-news/CargoAgent/show?judge=1");
		}else{
			$("#sort_list").attr("src","/jiaoshenmateam-news/CargoAgent/show?judge=1&q="+$("#Ainput").val());
		}
	});
	//货物量排名
	$("#quantity").click(function(){
		if($("#Ainput").val() ==''){
			$("#sort_list").attr("src","/jiaoshenmateam-news/CargoAgent/show?judge=0");
		}else{
			$("#sort_list").attr("src","/jiaoshenmateam-news/CargoAgent/show?judge=0&q="+$("#Ainput").val());
		}
	});

	//按搜索内容搜索
	$("#AsearchBut").click(function(){
		if($("#Ainput").val() == ''){
			alert("请输入搜索内容");
			return;
		}else{
			$("#sort_list").attr("src","/jiaoshenmateam-news/CargoAgent/show?judge=1&q="+$("#Ainput").val());
		}
	});
}
